package tests;

import java.util.ArrayList;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import sauvaget.Color;
import sauvaget.Image;
import sauvaget.IttensTable;

public class TestImage1 {

	private Image image;
	private IttensTable ittensTable; 
	private ArrayList<Color> sectorY, sectorG, sectorV, sectorR, sectorO, sectorB;
	
@Before
    public void createColor(){
		Color yellow1 = new Color( 50, 40, 40, 1024);
		Color yellow2 = new Color( 50, 40, 40, 1024);
		Color yellow3 = new Color( 50, 40, 40, 1024);
	
		sectorY = new ArrayList<Color>();
		sectorY.add(yellow1);
		sectorY.add(yellow2);
		sectorY.add(yellow3);
		
		Color green1  = new Color( 97, 18, 52, 2048);
		Color green2  = new Color( 97, 18, 52, 2048);
		
		sectorG = new ArrayList<Color>();
		sectorG.add(green1);
		sectorG.add(green2);
		
		Color violet1 = new Color(274, 54, 28, 3072);
		Color violet2 = new Color(274, 54, 28, 3072);
		Color violet3 = new Color(274, 54, 28, 3072);
		Color violet4 = new Color(274, 54, 28, 3072);
	
		sectorV = new ArrayList<Color>();
		sectorV.add(violet1);
		sectorV.add(violet2);
		sectorV.add(violet3);
		sectorV.add(violet4);
		
		Color red1 = new Color( 4, 38, 52, 5830);
		Color red2 = new Color( 4, 38, 52, 5830);
		Color red3 = new Color( 4, 38, 52, 5830);
		
		sectorR = new ArrayList<Color>();
		sectorR.add(red1);
		sectorR.add(red2);
		sectorR.add(red3);
		
		Color blue1   = new Color(189, 56, 28, 644);
		Color blue2   = new Color(189, 56, 28, 644);
		Color blue3   = new Color(189, 56, 28, 644);
		Color blue4   = new Color(189, 56, 28, 644);
		
		sectorB = new ArrayList<Color>();
		sectorB.add(blue1);
		sectorB.add(blue2);
		sectorB.add(blue3);
		sectorB.add(blue4);
		
		Color orange1 = new Color( 29, 29, 64, 322);
		Color orange2 = new Color( 29, 29, 64, 322);
		Color orange3 = new Color( 29, 29, 64, 322);
		Color orange4 = new Color( 29, 29, 64, 322);
		Color orange5 = new Color( 29, 29, 64, 322);
		
		sectorO = new ArrayList<Color>();
		sectorO.add(orange1);
		sectorO.add(orange2);
		sectorO.add(orange3);
		sectorO.add(orange4);
		sectorO.add(orange5);

		image = new Image(sectorY, sectorV, sectorG);
		ittensTable = new IttensTable();
    }

@Test
	public void verifyHarmony(){
		Assert.assertTrue(ittensTable.verifyHarmony(image));
	}
}

